package com.dy.drp.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @Auther: dy
 * @Date: 2022/4/4 - 04 - 04 - 11:22
 * @Description: com.dy.drp.util
 * @version: 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PageUtil<T> {
    private Integer count;
    private Integer totalPage;
    private Integer pageNum;
    private Integer pageSize;
    private List<T> list;

    public void setTotalPage(Integer count){
        totalPage = (count % pageSize == 0) ? (count / pageSize) : (count / pageSize) +1;
    }
}
